package com.song.feign.service;

import com.song.common.entity.R;
import com.song.emp.entity.Emp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author TonySong
 * @date 2024/4/27 0027
 * @time 16:38
 */
@FeignClient("emp-mp")
public interface EmpFeign {

    @GetMapping("/emp/")
    public R getEmp();

    @GetMapping("/emp/{id}")
    public R getEmpById(Long id);

    @PostMapping("/emp/")
    public R addEmp(@RequestBody Emp emp);

    @PutMapping("/emp/")
    public R updateEmp(@RequestBody Emp emp);

    @DeleteMapping("/emp/{id}")
    public R deleteEmp(@PathVariable("id") Long id);

}
